<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:sec="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title>Edit Use Case</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Dhrubo" />




</head>

<body>

	<form th:action="@{/appendnote}" th:fragment="edituc-notes"
		class="form-horizontal" method="post">


		<fieldset>
			<legend th:utext="#{notes}"></legend>

			<div class="control-group">

				<label class="control-label" for="description"
					th:utext="#{description}"></label>
				<div class="controls">
					<textarea rows="3" cols="20" name="description" required="required"
						class="input-xlarge" th:placeholder="${description}"></textarea>
				</div>
			</div>


			<div class="control-group">
				<label class="control-label" for="year" th:utext="#{targetdate}"></label>
				<div class="controls">
					<div id="startdate" class="input-append date">
						<input data-format="dd/MM/yyyy" type="text" required="required"
							name="targetDate" /> <span class="add-on"> <i
							data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
						</span>
					</div>
				</div>
			</div>


			<div class="control-group">
				<label class="control-label" for="year">Priority</label>
				<div class="controls">
					<select name="priority">
						<option id="High" label="High" value="High">High</option>
						<option id="Medium" label="Medium" value="Medium">Medium</option>
						<option id="Low" label="Low" value="Low">Low</option>
					</select>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label" for="name" th:utext="#{responsible}"></label>
				<div class="controls">
					<select name="user">
						<option th:each="u , row: ${useCase.project.users}"
							th:label="${u.name}" th:value="${u.id}" th:text="${u.name}" />

					</select> <input type="hidden" name="usecase" th:value="${useCase.id}" />
				</div>
			</div>


			<div class="form-actions">
				<button type="submit" class="btn btn-success" th:utext="#{save}"></button>
				<button type="reset" class="btn btn-info" th:utext="#{cancel}"></button>



			</div>

		</fieldset>
	</form>


	<div class="row-fluid" th:fragment="edituc-notes-list">
		<table class="condition">
			<thead>
				<tr>
					<th colspan="5">Notes</th>
				</tr>

				<tr>
					<th style="width: 5%">Sl#</th>

					<th>Description</th>
					<th>Target Date</th>
					<th>Responsible</th>
					<th style="width: 3%">Action</th>
				</tr>
			</thead>
			<tbody>


				<tr th:each="p, rowStat : ${useCase.notes}">
					<td style="width: 5%" th:text="${rowStat.count}">1</td>
					<td th:text="${p.description}"></td>
					<td th:text="${p.targetDate}"></td>
					<td th:text="${p.responsible.name}"></td>
					<td>


						<div class="btn-toolbar">
							<div class="btn-group">
								<a
									th:href="@{/closenote(usecase=${useCase.id}, index=${rowStat.index})}"
									class="btn btn-success"><i class="icon-ok icon-white"
									title="Delete"></i></a> <a
									th:href="@{/deletenote(usecase=${useCase.id}, index=${rowStat.index})}"
									class="btn btn-danger"><i
									class="icon-remove-sign icon-white" title="Delete"></i></a>
							</div>
						</div>
					</td>
				</tr>

			</tbody>
		</table>
	</div>


</body>
</html>
